#-------------------------------------------------
#
# Project created by QtCreator 2016-12-09T08:31:16
#
#-------------------------------------------------

QT       +=  websockets
QT       +=  widgets
QT       +=  xml
TARGET = EcatCore
TEMPLATE = lib

DEFINES += ECATCORE_LIBRARY
CONFIG += staticlib
CONFIG +=c++11
DESTDIR =/agvwork/AgvFundation/fundation/lib

#DEFINES +=D_PRINT_TIMER_TOOL
#2018.5 modify to open all ,and validate by config file
DEFINES += D_USE_ONLY_VREP #如果定义的话，仅支持完全仿真模式。
DEFINES += D_USE_IGH #如果定义的话，支持实体机和完全仿真模式
#DEFINES += D_USE_ACONTIS #如果定义的话，支持实体机和完全仿真模式(不确定）。

DEFINES += D_USE_MODBUS_RTU  #如果定义，使用modbus_rtu 　设备
DEFINES += D_USE_MODBUS_TCP  #如果定义，使用modbus_tcp　设备
#DEFINES += D_USE_CANOPEN  #如果定义，使用canopen　设备

INCLUDEPATH += $$PWD
DEPENDPATH += $$PWD

SOURCES += \
    $$PWD/ecatmotor.cpp \
    $$PWD/ecatio.cpp \
    $$PWD/robotio.cpp \
    $$PWD/robotbase.cpp \
    $$PWD/ethercaterror.cpp \
    $$PWD/timetool.cpp \
    $$PWD/ecatmasterbase.cpp \
    $$PWD/ecatlog.cpp \
    $$PWD/robotcontrol.cpp \
    $$PWD/ecatbusmanager.cpp \
    rfiddata.cpp \
    maganeticsensordata.cpp \
    encoderreceiver.cpp \
    logicmotor.cpp

HEADERS  += \
    $$PWD/ecatmotor.h \
    $$PWD/ecattype.h \
    $$PWD/ecatio.h \
    $$PWD/ecatconfig.h \
    $$PWD/ringqueue.h \
    $$PWD/robotio.h \
    $$PWD/robotbase.h \
    $$PWD/ethercaterror.h\
    $$PWD/timetool.h \
    $$PWD/ecatmasterbase.h \
    $$PWD/ecatlog.h \
    $$PWD/robotcontrol.h \
    $$PWD/ecatbusmanager.h\
    $$PWD/ethercatPdoDefine.h \
    ethercatVendorId.h \
    rfiddata.h \
    maganeticsensordata.h \
    encoderreceiver.h \
    pdomapstruct.h \
    logicmotor.h


#contains( DEFINES, D_USE_ONLY_VREP ){
#message("use vrep !")
#include( $$PWD/vrep/vrep.pri )
#}else{
#contains( DEFINES, D_USE_IGH ){
#message("use igh !")
#include( $$PWD/igh/igh.pri )
#}
#contains( DEFINES, D_USE_ACONTIS ){
#message("use acontis !")
#include( $$PWD/acontis/acontis.pri )
#}
#}
#include( $$PWD/modbusCom/modbusCom.pri )

INCLUDEPATH += ../igh/
INCLUDEPATH += ../acontis/
INCLUDEPATH += ../vrep/
INCLUDEPATH += ../modbusCom/
INCLUDEPATH +=../CoordinateModule/
INCLUDEPATH +=../AxisObject/

INCLUDEPATH +=../ProgramSet
INCLUDEPATH +=../LogicalInstruction
INCLUDEPATH +=../EcatCore
LIBS += -L../../lib -lEcatCore
INCLUDEPATH +=../DomParser
LIBS += -L../../lib -lDomParser
INCLUDEPATH +=../Md5Check
LIBS += -L../../lib -lMd5Check
INCLUDEPATH +=../HmiGsoapQt
LIBS += -L../../lib -lHmiGsoapQt
INCLUDEPATH +=../VrepRemoteControlor
LIBS += -L../../lib -lVrepRemoteControlor
INCLUDEPATH +=../WebServer
#LIBS += -L../../lib -lWebServer
#INCLUDEPATH +=../Coordinate
#LIBS += -L../../lib -lCoordinate
INCLUDEPATH +=../PointData
#LIBS += -L../../lib -lPointData
INCLUDEPATH +=../MessageLog
LIBS += -L../../lib -lMessageLog

#LIBS += -L../../lib -lInternalSafe

#LIBS += -L../../lib -lJointDecouple
INCLUDEPATH +=../MotorInterface
#LIBS += -L../../lib -lMotorInterface

#LIBS += -L../../lib -lPalletCalculate

#LIBS += -L../../lib -lControlLoop
INCLUDEPATH +=../RegData
#LIBS += -L../../lib -lRegData

#LIBS += -L../../lib -lTrajectoryScale
INCLUDEPATH += ../../include/actions/INC
INCLUDEPATH += ../../include/actions/INC/Linux
INCLUDEPATH += ../../include/ethercat-igh
INCLUDEPATH += ../../include/
INCLUDEPATH += ../../include/MacroDefine
#INCLUDEPATH += ../../include/alLib
#INCLUDEPATH += /usr/local/include/kdl

LIBS += -L../../lib -lMotionServer

INCLUDEPATH +=../MotionServer

INCLUDEPATH +=../MotionServer/Axis/
#INCLUDEPATH +=../Axis

INCLUDEPATH +=../PowerManager
LIBS += -L../../lib -lPowerManager
INCLUDEPATH +=../MeasureTime
LIBS += -L../../lib -lMeasureTime
INCLUDEPATH +=../RobotManager
LIBS += -L../../lib -lRobotManager
INCLUDEPATH +=../RobotEngine
LIBS += -L../../lib -lRobotEngine

INCLUDEPATH += /usr/local/include/kdl

INCLUDEPATH += ../XmlParse
LIBS += -L../../lib -lXmlParse
INCLUDEPATH +=../CanbusCom
INCLUDEPATH +=../ModbusDevice
LIBS += -L../../lib -lModbusDevice

INCLUDEPATH += /usr/local/include/modbus/
LIBS +=-L ../../lib/modbus/libmodbus.so


#DEFINES += BUILD_ARM
DEFINES += BUILD_X86_LINUX
#DEFINES += BUILD_X86_WINDOWS #为什么其它库pro也要定义这个才起作用。


contains( DEFINES, BUILD_X86_WINDOWS ){
message("project use BUILD_X86_WINDOWS !")
}
contains( DEFINES, BUILD_X86_LINUX ){
message("project use BUILD_X86_LINUX !")

}
contains( DEFINES, BUILD_ARM ){
message("project use BUILD_ARM !")
}



contains( DEFINES, BUILD_X86_WINDOWS ){
message("project use BUILD_X86_WINDOWS !")
DESTDIR =/agvwork/AgvFundation/fundation/lib/x86_WINDOWS
#编译中间文件目录
UI_DIR += ../../build/tmpBuildDirectory_windows
MOC_DIR +=../../build/tmpBuildDirectory_windows
OBJECTS_DIR += ../../build/tmpBuildDirectory_windows
RCC_DIR += ../../build/tmpBuildDirectory_windows
}

contains( DEFINES, BUILD_X86_LINUX ){
message("project use BUILD_X86_LINUX !")
DESTDIR =/agvwork/AgvFundation/fundation/lib

#编译中间文件目录
UI_DIR += ../../build/tmpBuildDirectory
MOC_DIR +=../../build/tmpBuildDirectory
OBJECTS_DIR += ../../build/tmpBuildDirectory
RCC_DIR += ../../build/tmpBuildDirectory
}

contains( DEFINES, BUILD_ARM ){
message("project use BUILD_ARM !")
DESTDIR =/agvwork/AgvFundation/fundation/lib-arm

#编译中间文件目录
UI_DIR += ../../build/tmpBuildDirectory_arm
MOC_DIR +=../../build/tmpBuildDirectory_arm
OBJECTS_DIR += ../../build/tmpBuildDirectory_arm
RCC_DIR += ../../build/tmpBuildDirectory_arm
}


